CFLAGS=-I./ -I../
LDFLAGS=-lpthread

objects=wontec_485.o wontec_test.o

all:$(objects)
	$(CXX) -o wontec_test $^ $(CFLAGS) $(LDFLAGS)
	cp -f wontec_test /mnt/hgfs/tools/bin/

wontec_485.o:wontec_485.cpp wontec_485.h wontec_wt184.h
	$(CXX) -c -o $@ $< $(CFLAGS)

wontec_test.o:wontec_test.cpp
	$(CXX) -c -o $@ $< $(CFLAGS)

cal_crc:
	$(CXX) -o cal_crc_wt cal_crc.cpp wontec_485.cpp
	cp -f cal_crc_wt /mnt/hgfs/tools/bin/

.PHONY:clean
clean:
	rm -f wontec_test $(objects)